var status = -1;
var selectionLog = [];

function action(mode, type, selection) {
    var reactor = "action" + (cm.getMapId() - 350131000);
    eval(reactor)(mode, type, selection)
}

function action400(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240178, 1, 16, 0, 100);
            cm.spawnMobLimit(8240178, 1, -264, 0, 100);
            cm.spawnMobLimit(8240178, 1, -463, 0, 100);
            cm.spawnMobLimit(8240178, 1, -739, 0, 100);
            cm.spawnMobLimit(8240178, 1, -993, 0, 100);
            cm.spawnMobLimit(8240177, 1, -138, 0, 100);
            cm.spawnMobLimit(8240177, 1, -367, 0, 100);
            cm.spawnMobLimit(8240177, 1, -599, 0, 100);
            cm.spawnMobLimit(8240177, 1, -880, 0, 100);
            cm.spawnMobLimit(8240177, 1, -1126, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/1");
            cm.spawnMobLimit(8240177, 1, -120, 0, 100);
            cm.addPopupSay(1540879, 1000, "#face3#切，是警卫兵吗？瞬间就有这么多的数量。", "", 0);
            cm.addPopupSay(1540880, 1000, "#face3#只能将他们全部消灭进行突破了。", "", 0);
            cm.addPopupSay(1540878, 1000, "#face4#虽然长得很别致，但着实令人讨厌！\r\n尤其要小心那些子弹！", "", 0);
            cm.spawnMobLimit(8240178, 1, -126, 0, 100);
            cm.spawnMobLimit(8240178, 1, 625, 0, 100);
            cm.spawnMobLimit(8240178, 1, 483, 0, 100);
            cm.spawnMobLimit(8240178, 1, 261, 0, 100);
            cm.spawnMobLimit(8240178, 1, 327, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1254, 0, 100);
            cm.spawnMobLimit(8240177, 1, 671, 0, 100);
            cm.spawnMobLimit(8240177, 1, 269, 0, 100);
            cm.spawnMobLimit(8240178, 1, 920, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1488, 0, 100);
            cm.spawnMobLimit(8240178, 1, 2242, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1988, 0, 100);
            cm.spawnMobLimit(8240177, 1, 2264, 0, 100);
            cm.spawnMobLimit(8240177, 1, 2233, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1939, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1648, 0, 100);
            cm.addPopupSay(1540886, 1000, "确认有未知出入者。\r\n确认有未知出入者。", "", 0);
            cm.addPopupSay(1540887, 1000, "立即离开禁止出入的区域。", "", 0);
            cm.dispose()
        }
    }
}

function action500(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240178, 1, 16, 0, 100);
            cm.spawnMobLimit(8240178, 1, -264, 0, 100);
            cm.spawnMobLimit(8240178, 1, -463, 0, 100);
            cm.spawnMobLimit(8240178, 1, -739, 0, 100);
            cm.spawnMobLimit(8240178, 1, -993, 0, 100);
            cm.spawnMobLimit(8240177, 1, -138, 0, 100);
            cm.spawnMobLimit(8240177, 1, -367, 0, 100);
            cm.spawnMobLimit(8240177, 1, -599, 0, 100);
            cm.spawnMobLimit(8240177, 1, -880, 0, 100);
            cm.spawnMobLimit(8240177, 1, -1126, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/stage");
            cm.fieldEffect_ScreenMsg("aswan/stageEff/number/2");
            cm.addPopupSay(1540879, 1000, "#face1#你真是太美丽了，女王。", "", 0);
            cm.addPopupSay(1540879, 1000, "#face4#刚才那个男子挺积极的嘛，双弩精灵？", "", 0);
            cm.addPopupSay(1540878, 1000, "#face8#幻影，算了！", "", 0);
            cm.spawnMobLimit(8240177, 1, -64, 0, 100);
            cm.spawnMobLimit(8240178, 1, 975, 0, 100);
            cm.spawnMobLimit(8240178, 1, 245, 0, 100);
            cm.spawnMobLimit(8240178, 1, -33, 0, 100);
            cm.spawnMobLimit(8240178, 1, 251, 0, 100);
            cm.spawnMobLimit(8240177, 1, 951, 0, 100);
            cm.spawnMobLimit(8240177, 1, 821, 0, 100);
            cm.spawnMobLimit(8240177, 1, 288, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1051, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1258, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1614, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1226, 0, 100);
            cm.spawnMobLimit(8240177, 1, 2193, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1818, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1254, 0, 100);
            cm.addPopupSay(1540880, 1000, "#face2#还看不到尽头，到底离超越石所在的地方还有多远？", "", 0);
            cm.addPopupSay(1540879, 1000, "#face4#木头，这么快就累了吗？", "", 0);
            cm.dispose()
        }
    }
}

function action600(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.spawnMobLimit(8240178, 1, 16, 0, 100);
            cm.spawnMobLimit(8240178, 1, -264, 0, 100);
            cm.spawnMobLimit(8240178, 1, -463, 0, 100);
            cm.spawnMobLimit(8240178, 1, -739, 0, 100);
            cm.spawnMobLimit(8240178, 1, -993, 0, 100);
            cm.spawnMobLimit(8240177, 1, -138, 0, 100);
            cm.spawnMobLimit(8240177, 1, -367, 0, 100);
            cm.spawnMobLimit(8240177, 1, -599, 0, 100);
            cm.spawnMobLimit(8240177, 1, -880, 0, 100);
            cm.spawnMobLimit(8240177, 1, -1126, 0, 100);
            cm.showMapleHero();
            cm.getTopMsgFont("只有将区域内的所有怪物全都消灭掉才能够前往下一地区。", 3, 20, 20, 0);
            cm.fieldEffect_ScreenMsg("aswan/stageEff/final");
            cm.addPopupSay(1540878, 1000, "#face4#闯祸了，很快这个世界的警卫就要来抓我们了。", "", 0);
            cm.addPopupSay(1540879, 1000, "#face7#赶快，速度再提高点！", "", 0);
            cm.spawnMobLimit(8240177, 1, -80, 0, 100);
            cm.spawnMobLimit(8240177, 1, -120, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1157, 0, 100);
            cm.spawnMobLimit(8240178, 1, 958, 0, 100);
            cm.spawnMobLimit(8240178, 1, -28, 0, 100);
            cm.spawnMobLimit(8240178, 1, 429, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1006, 0, 100);
            cm.spawnMobLimit(8240177, 1, 643, 0, 100);
            cm.spawnMobLimit(8240178, 1, 871, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1920, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1586, 0, 100);
            cm.spawnMobLimit(8240178, 1, 1298, 0, 100);
            cm.spawnMobLimit(8240177, 1, 2138, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1594, 0, 100);
            cm.spawnMobLimit(8240177, 1, 2225, 0, 100);
            cm.spawnMobLimit(8240177, 1, 1341, 0, 100);
            cm.spawnMobLimit(8240177, 1, 982, 0, 100);
            cm.addPopupSay(1540880, 1000, "#face3#呃……", "", 0);
            cm.addPopupSay(1540878, 1000, "#face4#夜光法师，发生什么事了吗？你的脸色看上去很不好。", "", 0);
            cm.addPopupSay(1540880, 1000, "#face3#啊，没什么，不用担心。", "", 0);
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};